package org.worthydots.access.jpa.dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class DAOImpl {
	
	// @PersistenceContext(unitName = "RailGaadiPersistenceUnit")
	protected EntityManager entityManager;

	public DAOImpl() {
		EntityManagerFactory emf = Persistence.createEntityManagerFactory("RailGaadiPersistenceUnit");
		entityManager = emf.createEntityManager();
	}
	
	public void setEntityManager(EntityManager entityManager) {
		this.entityManager = entityManager;
	}
}
